// pages/test/index.js
Page({
    data: {
        msg:'Hello MiniProgram',
        stu:[
            {name:'张三丰',score:100,skill:['闭关','太极','郭襄']},
            {name:'张三',score:90,skill:['闭关','太极']},
            {name:'三丰',score:80,skill:['闭关','郭襄']},
        ],
        isShow:false,
        isActive:true,
        tabArr:['正念冥想','睡眠助手','舒缓音乐'],
        tabIdx:0
    },
    handleShow(){
        console.log(1111);
        let bool = !this.data.isShow //提取原来的数据
        this.setData({ //唯一触发数据响应式变化的方法
            isShow:bool
        })
    },
    handleBg(){
        let isActive = !this.data.isActive
        this.setData({isActive})
    },
    handleTab(ev){
        console.log(ev);
        let {idx,num} = ev.currentTarget.dataset
        console.log(idx,num);
        this.setData({
            tabIdx:idx
        })
    },
    onLoad(options) {

    },
})